package com.zh.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.zh.Service.TestService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("test1")
public class TestController1 {

    @Resource
    TestService testService;


    @RequestMapping("test1")
    public AjaxResult test1(){
        return AjaxResult.success("test1");
    }

    @RequestMapping("test2")
    public Integer test2(){
        return 2;
    }

    @RequestMapping("/change")
    public AjaxResult changDataSource(){
        testService.test();
        return AjaxResult.success();
    }
}
